import { createSlice } from "@reduxjs/toolkit";

const counterReducer = createSlice({
    name: 'counterReducer',
    initialState: {
        count: 50,
        message: '饿了么'
    },
    reducers: {
        changeMessage: (state, { payload }) => {
            state.message = payload

        }
    }
})

export const { changeMessage } = counterReducer.actions
export default counterReducer.reducer
